import React from 'react';
import { Card, Row, Col, Typography } from 'antd';
import { Link } from 'umi';

const { Title, Paragraph } = Typography;

/**
 * 智能写作主页面
 * 提供各种写作相关AI功能的入口
 */
const IntelligentWritingPage: React.FC = () => {
  // 智能写作功能列表
  const writingFeatures = [
    {
      title: '快速写作',
      description: '根据关键词快速生成完整文章内容',
      path: '/intelligentWriting/quickWriting',
    },
    {
      title: '标题生成',
      description: '为文章生成吸引人的标题和副标题',
      path: '/intelligentWriting/titleGeneration',
    },
    {
      title: '内容大纲',
      description: '快速创建文章的结构和大纲',
      path: '/intelligentWriting/contentOutline',
    },
    {
      title: '文章续写',
      description: '根据已有内容继续编写下文',
      path: '/intelligentWriting/continuationArticle',
    },
    {
      title: '文章改写',
      description: '重写现有文章，保持原意但提升表达',
      path: '/intelligentWriting/articleRewriting',
    },
    {
      title: '文章总结',
      description: '提炼文章的核心观点和主要内容',
      path: '/intelligentWriting/proseSummary',
    },
    {
      title: '新闻撰写',
      description: '根据事件信息生成专业新闻稿',
      path: '/intelligentWriting/newsWriting',
    },
    {
      title: '读者评论',
      description: '模拟生成各类读者评论',
      path: '/intelligentWriting/readerComments',
    },
    {
      title: '风格润色',
      description: '调整文章的语言风格和表达方式',
      path: '/intelligentWriting/styleRefinement',
    },
  ];

  return (
    <div style={{ padding: '24px' }}>
      <Typography>
        <Title level={1}>智能写作</Title>
        <Paragraph>
          利用AI技术提升您的写作效率，提供多种专业写作辅助功能，帮助您快速生成高质量内容。
        </Paragraph>
      </Typography>
      
      <Row gutter={[16, 16]}>
        {writingFeatures.map((feature, index) => (
          <Col xs={24} sm={12} md={8} key={index}>
            <Card
              hoverable
              style={{ height: '100%', display: 'flex', flexDirection: 'column' }}
              bodyStyle={{ flex: 1 }}
            >
              <Link to={feature.path}>
                <Typography>
                  <Title level={4}>{feature.title}</Title>
                  <Paragraph>{feature.description}</Paragraph>
                </Typography>
              </Link>
            </Card>
          </Col>
        ))}
      </Row>
    </div>
  );
};

export default IntelligentWritingPage;